import Vue from 'vue'
import Router from 'vue-router'
import EditPost from './views/EditPost.vue'
import AddPost from './views/AddPost.vue'
import WriteComponent from './components/WriterComponent.vue'

Vue.use(Router)

export default new Router({
	base:'writer',
	routes:[
		{
			path:'/',
			name:'writer',
			component:WriteComponent,
			children:[
				{
					path:'create',
					name:'addPost',
					component:AddPost,
				},
				{
					path:'edit/:id',
					name:'article',
					component:EditPost,
				}

			]
		},
	]
})